package com.itheima.cases;

public class TextDemo8 {
    public static void main(String[] args) {
        //直角
        for (int i = 1 ; i < 10; i++) {
            for (int k = 1; k < 10 - k ; k++) {
                System.out.print("\t");
            }
            for (int j = 1; j < i + 1 ; j++) {
                System.out.print(j + "x" + j + "=" + i * j + "\t");
            }
            System.out.println();
        }

        //倒直角
        for (int i = 9 ; i > 0; i--) {
            for (int j = 1; j < 10 - j; j++) {
                System.out.print("\t");
            }
            for (int k = 1; k <= i; k++) {
                System.out.print(k + "x  " + i + "=" + i * k + "\t");
            }
            System.out.println();
        }
    }
}
